#include<bits/stdc++.h>
using namespace std;
//typedef long long ll;
using ll=long long;
ll factorial(int n){
	ll s=1;
	for(int i=2;i<=n;i++){
		s*=i;
	}
	return s;
}
int main() {
	cout<<(1==factorial(1))<<endl;//1
	cout<<(120==factorial(5))<<endl;//120
	cout<<(24==factorial(4))<<endl;//24
	cout<<factorial(20)<<endl;
	return 0;
}
